package com.xqboss.apps.enums.hama;

import com.xqboss.common.enums.BaseEnum;

import java.util.Objects;

/**
 *
 * 运动场使用的藏品
 *
 */
public enum HamaNftTypeEnum implements BaseEnum<Integer> {
    BRACELET_RARE(97, "极光·稀有"),
    BRACELET_ORD(213, "极光·普通"),
    SPORT_KA(290, "蛙蛙运动卡")
    ;

    private Integer value;
    private String msg;

    HamaNftTypeEnum(Integer value, String desc) {
        this.value = value;
        this.msg = desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public static String getNftName(Long nftId){
        if (nftId==null) {
            return "装备";
        }
        for (HamaNftTypeEnum value : HamaNftTypeEnum.values()) {
            if (Objects.equals(Long.valueOf(value.getValue()), nftId)) {
                return value.getMsg();
            }
        }
        return "装备";
    }
}
